import 'package:json_annotation/json_annotation.dart';
part 'service_channel_list_api.g.dart';

@JsonSerializable()
class ResponseServiceChannelListApi {
  @JsonKey(name: 'Entities')
  final List<ServiceChannel> entities;

  factory ResponseServiceChannelListApi.fromJson(Map<String, dynamic> json) {
    return _$ResponseServiceChannelListApiFromJson(json);
  }

  ResponseServiceChannelListApi({required this.entities});

  Map<String, dynamic> toJson() => _$ResponseServiceChannelListApiToJson(this);
}

@JsonSerializable()
class ServiceChannel {
  @JsonKey(name: 'casdon_sales_channelsid')
  final String id;
  @JsonKey(name: 'casdon_name')
  final String name;
  @JsonKey(name: 'casdon_channel_code')
  final String code;

  factory ServiceChannel.fromJson(Map<String, dynamic> json) {
    return _$ServiceChannelFromJson(json);
  }

  ServiceChannel({required this.id, required this.name, required this.code});

  Map<String, dynamic> toJson() => _$ServiceChannelToJson(this);
}
